/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.ranch.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Reperesents address
 */
@Entity
@Table(name="address")
public class Address extends BaseData{

    /**
     * Pysical address. Eg. 15Km along Entebbe Road.
     */
    private String physicalAddress;
    /**
     * post office boxNumber or code.
     */
    private String postOfficeCode;
    /**
     * email address line.
     */
    private String email;
    /**
     * telephone number.
     */
    private String phoneNo;

    /** Default constructor */
    public Address(){}

    public Address(String physicalAddress, String postOfficeCode, String email, String phoneNo){
        super();
        setEmail(email);
        setPhoneNo(phoneNo);
        setPhysicalAddress(physicalAddress);
        setPostOfficeCode(postOfficeCode);
    }

    /**
     * Gets the email address
     * @return
     */
    @Column(name="email", nullable=true)
    public String getEmail() {
        return email;
    }

    /**
     * Sets the email address
     * @param email
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * Gets the phoneNo
     * @return
     */
    @Column(name="phone_no",nullable=false)
    public String getPhoneNo() {
        return phoneNo;
    }

    /**
     * Sets the phone No
     * @param phoneNo
     */
    public void setPhoneNo(String phoneNo) {
        this.phoneNo = phoneNo;
    }

    @Column(name="physical_address",  nullable=true)
    public String getPhysicalAddress() {
        return physicalAddress;
    }

    public void setPhysicalAddress(String physicalAddress) {
        this.physicalAddress = physicalAddress;
    }

    @Column(name="post_office_code")
    public String getPostOfficeCode() {
        return postOfficeCode;
    }

    public void setPostOfficeCode(String postOfficeCode) {
        this.postOfficeCode = postOfficeCode;
    }

}
